home *** CD-ROM | disk | FTP | other *** search
/ MacFormat España 24 / MacFormat n. 24 (Spain) / MacFormat 24.bin / Demos / Jungle Activated! / JungleActivated Demo / jung DEMO d / 00158_Mixer- Enter Frame 1.ls < prev    next >
Encoding:
Text File  |  1996-10-14  |  1.2 KB  |  44 lines

  1. on enterFrame
  2.   global gWhichSound1, gWhichSound3, gWhichSound4, gWhichSound5, gWhichSound6, gWhichSound7, gWhichSound8, gWhichSound9, gWhichSound10, gWhichSound11, gVolume
  3.   set gWhichSound1 to EMPTY
  4.   set gWhichSound2 to EMPTY
  5.   set gWhichSound3 to EMPTY
  6.   set gWhichSound4 to EMPTY
  7.   set gWhichSound5 to EMPTY
  8.   set gWhichSound6 to EMPTY
  9.   set gWhichSound7 to EMPTY
  10.   set gWhichSound8 to EMPTY
  11.   set gWhichSound9 to EMPTY
  12.   set gWhichSound10 to EMPTY
  13.   set gWhichSound11 to EMPTY
  14.   puppetSprite(2, 1)
  15.   puppetSprite(24, 1)
  16.   puppetSprite(47, 1)
  17.   puppetSprite(48, 1)
  18.   repeat with i = 1 to 48
  19.     set the visible of sprite i to 1
  20.   end repeat
  21.   if the volume of sound 2 > 0 then
  22.     set gVolume to the volume of sound 2
  23.     set gVolume to gVolume - 20
  24.     set the volume of sound 2 to gVolume
  25.   end if
  26. end
  27.  
  28. on exitFrame
  29.   global gWhichSound1, gWhichSound2, gWhichKeyboard
  30.   go(the frame)
  31.   if the volume of sound 2 < 1 then
  32.     repeat with i = 1 to 15
  33.       sound stop i
  34.     end repeat
  35.     go(the frame + 1)
  36.     repeat with VolumeCounter = 1 to 15
  37.       set the volume of sound VolumeCounter to 256
  38.     end repeat
  39.     sound playFile 12, getpn() & "Sounds:Loops:Renkgrve.aif"
  40.     set gWhichKeyboard to 0
  41.     updateStage()
  42.   end if
  43. end
  44.